From: Florian Müllner Date: Fri, 4 Oct 2024 12:10:21 +0000 (+0200) Subject: tools/toolbox: Add --sysext option to meson-build X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~173^2^2~146 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2df35aaa7367a4420a85b3f6952ff95fcd9374b7;p=gnome-shell.git tools/toolbox: Add --sysext option to meson-build When specified, the project is installed to a separate destdir inside the container instead of the container's root filesystem. This can be used to install several projects into a common extension directory: ``` $ (cd mutter; meson-build.sh --sysext) && (cd gnome-shell; meson-build.sh --sysext) ``` We will later add a separate command to extract the directory from the container and turn it into a system extension suitable for use with systemd-sysext. Part-of: --- diff --git a/tools/toolbox/meson-build.sh b/tools/toolbox/meson-build.sh index b0a237f5c..a2f637c7c 100755 --- a/tools/toolbox/meson-build.sh +++ b/tools/toolbox/meson-build.sh @@ -18,6 +18,7 @@ usage() { --dist Run meson dist --reconfigure Reconfigure the project --wipe Wipe build directory and reconfigure + --sysext Install to separate target suitable for systemd-sysext -h, --help Display this help @@ -50,10 +51,11 @@ compile_command() { } install_command() { - if [[ $RUN_DIST ]]; then - echo -n : + local destdir=${BUILD_SYSEXT:+/var/lib/extensions/$TOOLBOX} + if [[ $destdir || ! $RUN_DIST ]]; then + echo -n "sudo meson install -C $BUILD_DIR ${destdir:+--destdir=$destdir}" else - echo -n "sudo meson install -C $BUILD_DIR" + echo -n : fi } @@ -76,6 +78,7 @@ TEMP=$(getopt \ --longoptions 'dist' \ --longoptions 'reconfigure' \ --longoptions 'wipe' \ + --longoptions 'sysext' \ --longoptions 'help' \ -- "$@") || die "Run $(basename $0) --help to see available options" @@ -106,6 +109,11 @@ while true; do shift ;; + --sysext) + BUILD_SYSEXT=1 + shift + ;; + -D) MESON_OPTIONS+=(-D$2) shift 2